package com.ssn.composite.file;

public class File implements Component {
    private String name;
    File(String name){
        this.name = name;
    }
    @Override
    public void add(Component component) {
    }

    @Override
    public void del(Component component) {
    }

    @Override
    public void click() {
        System.out.println("open file " + name);
    }

    @Override
    public String toString() {
        return "File{" +
                "name='" + name + '\'' +
                '}';
    }
}
